import request from '@/utils/request'
// 执法机关主体信息 API接口
const info_force_unitApi = {
    list: '/info_force_unit/list',
    save: '/info_force_unit/save',
    view: '/info_force_unit/view',
    del: '/info_force_unit/delete',
    dels: '/info_force_unit/batchDel',
    output: '/info_force_unit/output',
    exportExcelTemplate: '/info_force_unit/exportExcelTemplate',
    importExcel: '/info_force_unit/importExcel'
}

/**
 * 导入执法机关主体信息Excel
 */
export function importExcel(data) {
  var body = new FormData()
  body.append("file", data);
  return request({
    url: info_force_unitApi.importExcel,
    headers: {"Content-Type": "multipart/form-data"},
    method: 'post',
    data: body
  })
}

/**
 * 导出执法机关主体信息Excel模板
 */
export function exportExcelTemplate () {
    return request({
        url: info_force_unitApi.exportExcelTemplate,
        method: 'post',
        responseType: 'blob'
    })
}

/**
 * 导出执法机关主体信息
 */
export function output (data) {
    return request({
        url: info_force_unitApi.output,
        method: 'post',
        data: data ,
        responseType: 'blob'
    })
}
/**
 * 批量删除执法机关主体信息
 * @param {*} ids
 */
export function delInfo_force_units (ids) {
    return request({
        url: info_force_unitApi.dels,
        method: 'post',
        params: {ids}
    })
}
/**
 * 删除执法机关主体信息
 * @param {*} id
 */
export function delInfo_force_unit (id) {
    return request({
        url: info_force_unitApi.del,
        method: 'post',
        params: {id}
    })
}
/**
 * 查看、编辑执法机关主体信息
 * @param {*} id
 */
export function viewInfo_force_unit (id) {
    return request({
        url: info_force_unitApi.view,
        method: 'get',
        params: {id}
    })
}
/**
 * 保存执法机关主体信息
 * @param {*} body
 */
export function saveInfo_force_unit (body) {
    return request({
        url: info_force_unitApi.save,
        method: 'post',
        data: body
    })
}
/**
 * 查询执法机关主体信息列表
 * @param {*} body
 */
export function queryInfo_force_unitList (body) {
    return request({
        url: info_force_unitApi.list,
        method: 'post',
        data: body
    })
}